package gamePackage;

//Imports
import java.awt.*;
import javax.swing.*;
import java.util.*;

public class AI {

	double x,y; //Enemy attributes
	Image enemy; //Image variable
	int aiHealth = 5; //AI health (if 0, AI gets removed)
	
	//Constructor
	public AI(int startX, int startY, String location){ //AI(starting x position, starting y position, image)
		
		//AI Start
		x = startX;
		y = startY;
		ImageIcon enemyimg = new ImageIcon("src/Enemy1.png");
		enemy = enemyimg.getImage();
		
	}//End constructor

	//Character hit detection
	public Rectangle getSize(){
		return new Rectangle((int)x,(int)y, 76,69);
	}
	
	//Assigns values to enemies
	public int getX(){
		return (int)x;
	}
	public int getY(){
		return (int)y;
	}
	public int isAlive(){
		return aiHealth;
	}
	public Image getImage(){
		return enemy;
	}
	public void move(double dx, double dy){
		if (x + dx < -150) {
			aiHealth = 0;
		}
		else {
			x = x + dx;
		}
		y = y + dy;
	}
	
	
	
	
}
